﻿
CREATE PROCEDURE [svc].[GetTopWaitTimeServerAndTime]
(
	@FromDate				datetime,
	@ToDate					datetime 
)
AS
BEGIN

SELECT TOP 1 InstanceName, DatabaseName, WaitTime FROM dbo.ExecSessionLog 
WHERE LastModifiedDate BETWEEN @FromDate AND @ToDate 
ORDER BY WaitTime DESC 

END